package com.credit.management.system.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.credit.management.system.custom.dao.CSyuserroleMapper;
import com.credit.management.system.generator.dao.SyuserroleMapper;
import com.credit.management.system.model.Syuserrole;
import com.credit.management.system.service.ISyuserroleService;
@Service
public class SyuserroleService implements ISyuserroleService {
	@Autowired
	private CSyuserroleMapper csyuserroleMapper;
	@Autowired
	private SyuserroleMapper syuserroleMapper;
	/**
	 * 根据id删除syuserrole
	 */
	
	@Override
	public int deleteUserRoles(Integer userId) {
		
		return csyuserroleMapper.deleteUserRoles(userId);
	}
	
	/**
	 * 删除
	 */
	@Override
	public int deleteByPrimaryKey(Integer id) {
		
		return syuserroleMapper.deleteByPrimaryKey(id);
	}
	
	/**
	 * 添加
	 */
	@Override
	public int insertSelective(Syuserrole record) {
		
		return syuserroleMapper.insertSelective(record);
	}
	
	/**
	 * 根据id查找
	 */
	@Override
	public Syuserrole selectByPrimaryKey(Integer id) {
		
		return syuserroleMapper.selectByPrimaryKey(id);
	}
	
	/**
	 * 根据id修改
	 */
	@Override
	public int updateByPrimaryKeySelective(Syuserrole record) {
		
		return syuserroleMapper.updateByPrimaryKeySelective(record);
	}
}
